<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>通知公告</title>
    <link rel="stylesheet" type="text/css" href="__STATIC__/pc/css/head.css">
	<link rel="stylesheet" type="text/css" href="__STATIC__/pc/css/setdiv.css">
    <script src="__STATIC__/admin/js/jquery.js"></script>
</head>
<style type="text/css">
    body{
        font-size: 12px;
        margin: 0;
        padding: 0;
    }
    .pic{
        text-align: center;
        height: 328px;
        overflow: hidden;
    }
    .pic img{
        height: 350px;
    }
    .lianjie{
        margin-left: 34px;
        font-size: 18px;
        color: #7B7B7B;
        margin-top: 14px;
    }
    .search{
        display:flex;
        -webkit-display:flex;
        justify-content: space-between;
        padding: 0 68px;
        font-size: 18px;
        margin-top: 40px;
    }
    .search select{
        width: 100%;
        height: 38px;
        line-height: 38px;
    }
    .search1{
        display:flex;
        -webkit-display:flex;
        justify-content: flex-start;
        height: 38px;
    }
    .search1 select{
        border-bottom-left-radius: 19px;
        border-top-left-radius: 19px;
    }
    .title1{
        display:flex;
        -webkit-display:flex;
        justify-content: space-between;
        padding: 68px 40px 0;
    }
    .list3{
        display:flex;
        -webkit-display:flex;
        justify-content: space-between;
        padding: 0 40px;
        font-size: 18px;
        color: #393939;
        margin-bottom: 25px;
    }
    .list3_content{
        width: 80%;
        white-space: nowrap;
        text-overflow:ellipsis;
        overflow: hidden;
    }
    .list3 span{
        color: #0ABDCB;
    }
    .list3 i{
        display: inline-block;
        width: 13px;
        height: 13px;
        background: #FF881E;
        margin-right: 6px;
    }
    .line{
        width: calc(100% - 80px);
        height: 1px;
        background: #eee;
        margin: 0 auto;
        margin-top: 13px;
        margin-bottom: 30px;
    }
    .pic3{
        width: 30px;
        position: relative;
        top: 5px;
        margin-right: 3px;
    }
    .btn_f{
        color: #FF8610;
    }
    .btn_s{
        color: #7B7B7B;
    }
    .bodycenter{
    	//background-color: red;
    	width: 64%;
    	align-content: center;
    	margin-left: auto;
    	margin-right: auto;
    }
	.selectwidth{
		width : 10%;
	}
.quanwidth{
		width : 20%;
	}
	
</style>
<body>
<div style="background: #00B1D7;color: #fff;">
    <include file="Public:nav" />
</div>
<div class="pic">
    <img src="__STATIC__/pc/img/notice.jpg">
</div>
<include file="Public:boder" />


<div class="bodycenter" >

<div class="lianjie">首页>通知公告</div>
<form action="{:url('notice/notice_list')}">
    <div class="search">
        <div style="line-height: 38px;">地区筛选</div>
        <div class="select-area selectwidth">
            <select name="state">
                <option >国家</option>
                <volist name="state_list" id="vo">
                    <option value="{$vo.id}" <if condition="$vo.id == $state">selected</if>>{$vo.state_name}</option>
                </volist>
            </select>
        </div>
        <div class="select-area selectwidth">
            <select name="province">
                <option >省</option>
                <volist name="province_list" id="vo">
                    <option value="{$vo.id}" <if condition="$vo.id == $province">selected</if>>{$vo.name}</option>
                </volist>
            </select>
        </div>
        <div class="select-area selectwidth">
            <select name="city">
                <option value="">市</option>
                <volist name="city_list" id="vo">
                    <option value="{$vo.id}" <if condition="$vo.id == $city">selected</if>>{$vo.name}</option>
                </volist>
            </select>
        </div>
        <div class="select-area selectwidth">
            <select name="country">
                <option value="">地区（县）</option>
                <volist name="country_list" id="vo">
                    <option value="{$vo.id}" <if condition="$vo.id == $country">selected</if>>{$vo.name}</option>
                </volist>

            </select>
        </div>
        <div class="selectwidth">
            <select name="order" >
                <option>时间排序</option>
                <option value="0" <if condition="$order =='0'">selected</if>>正序</option>
                <option value="1" <if condition="$order =='1'">selected</if>>倒序</option>
            </select>
        </div>
        <div class="selectwidth">
            <select name="department">
                <option>部门</option>
                <volist name="department_list" id="vo">
                    <option value="{$vo}" <if condition="$vo == $department">selected</if>>{$vo}</option>
                </volist>
            </select>
        </div>
        <div class="search1 quanwidth">
            <select style="width: 30%;padding-left: 5px;border-right: 0;">
                <option>全站</option>
            </select>
            <input placeholder="请输入关键字搜索" type="text" name="title" style="border-right: 0;outline-style: none;border-left: 0;border: 0;border-top: 1px solid #999;border-bottom: 1px solid #999;width: 50%;" value="{$title?$title:'';}">
            <div  onclick="search_submit()" style="width: 20%;height: 36px;border: 1px solid #999;border-top-right-radius: 18px;border-bottom-right-radius: 18px;border-left: 0;"><img src="__STATIC__/pc/img/search.png" style="width: 16px;margin-top: 10px;margin-left: 1px;"></div>
        </div>
    </div>
</form>
<div class="title1">
    <div style="font-size: 24px;color: #383838;"><img src="__STATIC__/pc/img/pic2.png" class="pic3">通知公告</div>
    <div style="font-size: 18px;color: #7B7B7B;">
        <a href="javascript:void(0)" <switch name="$time"><case value='1'>class="btn_f"</case><case value='0'>class="btn_s"</case></switch>  style="margin-right:5px;display:inline-block" id="btn_f">通知中</a>|<a href="javascript:void(0)" <switch name="$time"><case value='0'>class="btn_f"</case><case value='1'>class="btn_s"</case></switch>  style="margin-left: 5px;display:inline-block" id="btn_s">通知期已过</a>
    </div>
</div>
<div class="line"></div>
    <volist name="notice_result" id="vo">

        <div class="list3">
            <div class="list3_content"><i></i><a style="text-decoration: none;color: #393939;" href="javascript:void(0)" a_href="{:url('notice/detail_continue')}" onclick="return_notice(this)" id="{$vo.id}">
			<span>
			
			【{$vo.department}】 
			</span> 
			
			
			{$vo.title}
			
			</a></div>
            <div style="color: #B3B3B3;"> 
			
			{$vo.take_time|date="Y-m-d",###}
			
			</div>
        </div>
    </volist>
</div>

<div class="line" style="margin-top: 50px;margin-bottom: 60px;"></div>
<div class="page">
    {$page}
    </div>
</div>


</div>

<include file="Public:footer" />
</body>
<script>

    //    参数(url)
    var state = "{$state}";
    var province = "{$province}";
    var city = "{$city}";
    var country = "{$country}";
    var v = "{$order}";
    var title = "{$title}";
    var time = "{$time}"
    var department = "{$department}"

    function search_submit() {
        $("form").submit();
    }
    //公示中 1
    $('#btn_s').click(function(){
        window.location.href = '/pc/notice/notice_list.html?state='+state+'&province='+province+'&city='+city+'&country='+country+'&order='+v+'&department='+department+'&title='+title+'&time='+0;
    });
    $('#btn_f').click(function(){
        window.location.href = '/pc/notice/notice_list.html?state='+state+'&province='+province+'&city='+city+'&country='+country+'&order='+v+'&department='+department+'&title='+title+'&time='+1;
    });

    $("select[name='state']").change(function(){
        var state = $(this).val();
        var province ='';
        var city = '';
        var country = '';
        window.location.href =  '/pc/Notice/notice_list.html?state='+state+'&province='+province+'&city='+city+'&country='+country+'&order='+v+'&department='+department+'&title='+title+'&time='+time;
    });
    $("select[name='province']").change(function(){
        var province = $(this).val();
        var city = '';
        var country = '';
        window.location.href =  '/pc/Notice/notice_list.html?state='+state+'&province='+province+'&city='+city+'&country='+country+'&order='+v+'&department='+department+'&title='+title+'&time='+time;
    });
    $("select[name='city']").change(function(){
        var city = $(this).val();
        var country = '';
        window.location.href = '/pc/Notice/notice_list.html?state='+state+'&province='+province+'&city='+city+'&country='+country+'&order='+v+'&department='+department+'&title='+title+'&time='+time;
    });
    $("select[name='country']").change(function(){
        var country = $(this).val();
        window.location.href = '/pc/Notice/notice_list.html?state='+state+'&province='+province+'&city='+city+'&country='+country+'&order='+v+'&department='+department+'&title='+title+'&time='+time;
    });
    $("select[name='order']").change(function(){
        var v = $(this).val();
        window.location.href = '/pc/Notice/notice_list.html?state='+state+'&province='+province+'&city='+city+'&country='+country+'&order='+v+'&department='+department+'&title='+title+'&time='+time;
    });
    $("select[name='department']").change(function(){
        var department = $(this).val();
        window.location.href = '/pc/Notice/notice_list.html?state='+state+'&province='+province+'&city='+city+'&country='+country+'&order='+v+'&department='+department+'&title='+title+'&time='+time;
    });
    //检测是否有权限
    function return_notice(obj){
        var a_href = $(obj).attr('a_href');
        var id = $(obj).attr('id');

        var formData = new FormData();
        formData.append('id',id);

        $.ajax({
            url:a_href,
            type:'POST',
            data:formData,
            async:false,
            processData:false,
            contentType:false,
            success:function(result){
                if(result.code == 0){
                    layer.alert(result.msg);
                    return false;
                }

                location.href=result.url;
            }

        });
    }
</script>
</html>